import java.awt.Toolkit;

import javax.swing.*;

import java.awt.event.*;


public class PopupMenu extends Window {
	public JPopupMenu menu = new JPopupMenu();
    public JMenuItem menuItemBeep = new JMenuItem("Beep");
    public JMenuItem menuItemClose = new JMenuItem("Close");
    Toolkit toolkit;
    
    
    public PopupMenu () {
    	
    	
    	
    	
    	this.menuItemBeep.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                toolkit.beep();
            }
        });
    	
    	this.menu.add(menuItemBeep);
    	
    	this.menuItemClose.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                System.exit(0);
            }
        });
    	
    	this.menu.add(menuItemClose);
    	
    }
	
	
}
